Instead of using the 'y', which queues a full relayout and
thus forces effects to be reapplied, use the 'translation_y'
property, that doesn't force relayouts and allows a future
blur effect to actually use the cached framebuffers a lot more.
This is a moderately fast two-pass gaussian blur implementation.
It downscales the framebuffer dynamically before applying the
gaussian shader, which cuts down rendering time quite considerably.
The blur shader takes 2 uniforms as input: the blur radius; and
whether to blur vertically or horizontally.
The blur radius is treated as an integer in C land to simplify
calculations. The vertical parameter is treated as an integer by
the shader simply due to Cogl not having proper boolean support
in snippets.
At last, brightness is also added to avoid needing to use an extra
effect to achieve that. Brightness is applied in a different pipeline
than blur, so we can control it more tightly.
ShellBlurEffect also implements a "background" mode, where the contents
beneath the actor are blurred, but not the actor itself. This mode is
performance-heavy.
Many of the apps in the favorite apps list have fallen out of favor.
Replacing Rhythmbox with Music and Shotwell with Photos are obvious
moves. Rhythmbox and Shotwell are not core apps, and that means we
assume they are not installed by default. It doesn't really make sense
to have non-default apps in the apps list.
Evolution is also not a core app, and that is not likely to change, so
it should also be removed. Adding Geary might be more controversial. It
is a strong candidate to become a core app, GNOME Mail, in the near
future, but it is not there yet. So this could arguably be considered
premature. But I figure a GSettings
default is a cheap thing; we can always change it later if desired.
Calendar is added at the request of GNOME design team ("replacing" the
calendar functionality of Evolution).
Florian Müllner [Wed, 4 Dec 2019 15:23:08 +0000 (16:23 +0100)]
data: Drop old bugzilla references in .desktop files
They are obsolete, and I don't think we have a gitlab replacement
(plus the fields probably stopped being relevant when bug-buddy
went out of fashion ages ago).
Florian Müllner [Fri, 20 Dec 2019 21:47:01 +0000 (22:47 +0100)]
iconGrid: Fix icon alignment
We don't want the icon to fill extra space, so set the alignment
accordingly. Otherwise we get an unexpected result when adding
a background just to the icon part (as far as I can tell: just
system-action-icon).
Florian Müllner [Fri, 20 Dec 2019 19:54:07 +0000 (20:54 +0100)]
st: Fix generated GLSL dependency
StScrollViewFade depends on st-scroll-view-fade-generated.c, but
that dependency isn't expressed to the build system; we just hope
that the custom target runs before compiling the effect.
Instead, add the generated source to the st target so the dependency
is expressed properly.
(The change from .c to .h is to prevent the file from being both
included and compiled, resulting in a duplicated symbol)
Florian Müllner [Thu, 19 Dec 2019 02:39:39 +0000 (03:39 +0100)]
screenshot: Promisify SelectArea
The screenshot code has a fair bit of nested callbacks, which means
that it is a good use case for async functions and Promises.
Most code uses GIO's async pattern, which means it can be easily turned
into promises with Gio._promisify(); first handle the couple of cases
that need custom code though, starting with SelectArea.
Florian Müllner [Tue, 17 Dec 2019 00:00:40 +0000 (01:00 +0100)]
panel: Disable menu-toggle shortcuts while top bar is hidden
We currently handle the case where the indicator itself is disabled
(read: hidden), but not when the entire top bar is invisible (for
instance when the primary monitor is in fullscreen state).
It is odd to pop up a top bar menu without the top bar, so check for
the indicator's mapped- instead of visible state.
Epiphany and Evolution updated their desktop IDs years ago. I assume the
rename list in appFavorites.js ensures this is still working properly
despite the obsolete names.
Florian Müllner [Tue, 3 Dec 2019 02:02:30 +0000 (03:02 +0100)]
extensions-tool: Set up translations for standalone builds
While we can now build gnome-extensions-tool as stand-alone project,
we are currently missing any translations, as those are part of
gnome-shell.
The easiest option for addressing this would be to symlink the toplevel
po directory into the subproject, however that would mean duplicating
the entire gnome-shell message catalogs.
So instead, set up a bare po directory and provide a script to populate
it from the translations in the toplevel po directory.
Florian Müllner [Mon, 2 Dec 2019 23:07:01 +0000 (00:07 +0100)]
extensions-tool: Move to a subproject
The gnome-extensions tool code is really independent from the rest of the
code base, and could be used either as part of the gnome-shell build or as
stand-alone project (for example for the extension-ci docker image).
We can actually support both cases by moving the code to a subproject.
Florian Müllner [Mon, 2 Dec 2019 23:43:08 +0000 (00:43 +0100)]
build: Remove left-over file
The file was generated when importing gnome-extensions-tool from
a standalone repository. It isn't used by the build system, and
really shouldn't have ended up in the repository at all.
Umang Jain [Tue, 10 Dec 2019 19:05:10 +0000 (00:35 +0530)]
StPasswordEntry: Add the peek-password-icon for show/hide passwords
Also introduce a "show-peek-icon" property to enable/disable
the peek-password-icon in the password entry. This is useful
in cases where the peeking the password functionality needs
to be avoided.
Umang Jain [Fri, 13 Dec 2019 12:37:57 +0000 (18:07 +0530)]
st-entry: Remove caps-lock feedback warning
This frees the entry's secondary icon that for other uses.
Caps-lock-warning feedback has been moved to be shown in
the various dialogs instead in the password-entries itself.
StPasswordEntry can now use a peek-password icon as the
secondary icon to show/hide the password present in the
entry.
Umang Jain [Thu, 12 Dec 2019 09:32:53 +0000 (15:02 +0530)]
js: Use StPasswordEntry for password entry fields
Use the new StPasswordEntry for password entry fields
and remove all direct handling of clutter text of the entry
via clutter_text_set_password_char to show/hide the password
text. StPasswordEntry will provides a peek-password-icon which
will allow to show/hide the password present in the field to
the user in subsequent commits.
Umang Jain [Thu, 12 Dec 2019 09:08:42 +0000 (14:38 +0530)]
shellEntry: Handle PasswordEntries automatically
shellEntry should not need to query the clutter-text directly
in order to know if the entry is for passport-input purpose.
shellEntry can easily determine a password-entry by querying
if it is an instance of StPasswordEntry and use it's API
whereever relevant.
Umang Jain [Tue, 12 Nov 2019 13:14:17 +0000 (18:44 +0530)]
St: Add a StPasswordEntry subclass based on StEntry
StPasswordEntry will be put to use for password entries
in various shell dialogs. This is done to have a consistent
behaviour for all password entries and introduce a peek
password functionality for these password entries in the
subsequent commits.
Carlos Garnacho [Fri, 13 Dec 2019 17:14:51 +0000 (18:14 +0100)]
workspace: Pass device to startDrag()
This is necessary to make DnD operations work from tablet devices on
wayland, as it's not the same onscreen pointer sprite than mice. Fixes
window DnD in the overview on tablet devices, no longer having them stick
to the wrong pointer.
Bastien Nocera [Thu, 24 Oct 2019 12:39:25 +0000 (14:39 +0200)]
shell-app: Add discrete GPU support for NVidia drivers
Use data from switcheroo-control to know which environment variables
to use to launch an application on the discrete GPU. switcheroo-control
version 2.0 or newer should be installed on Linux platforms.
Florian Müllner [Wed, 27 Nov 2019 22:01:15 +0000 (23:01 +0100)]
weather: Only require auto-location authorization if sandboxed
Since commit 87e60ed97843, geoclue no longer pretends that authorization
is useful for system-installed apps (as they can easily lie about their
ID). Unfortunately this broke our auto-location support in case Weather
is installed non-sandboxed, as we are waiting for an authorization that
will never happen.
Unbreak it by only requiring authorization when installed as Flatpak.
Florian Müllner [Fri, 6 Dec 2019 17:07:35 +0000 (18:07 +0100)]
popupMenu: Close when a system modal pops up
Just like switcher popups, popup menus don't play well together with
system modals, and generally have a lower priority. So just like
switcher popups, close popup menus when a system modal dialog pops
up.
Florian Müllner [Fri, 6 Dec 2019 12:56:24 +0000 (13:56 +0100)]
switcherPopup: Dismiss when a system modal dialog opens
As system modal dialogs may open without user interaction (for instance
polkit or network agent requests), it is possible for them to pop up
while the app/window switcher is up.
The current result of having both up simultaneously is clearly broken,
so we can either dismiss the popup or prevent the modal dialog from
opening. Assume that the dialog indicates a more important action and
should therefore take precedence, so go with the former.
Florian Müllner [Thu, 5 Dec 2019 13:12:47 +0000 (14:12 +0100)]
perf-helper: Add content for custom drawing
Drawing windows got a lot more involved with the advent of client-side
decorations. Instead of accounting for visible and invisible borders,
titlebar and shadows when necessary, just add an empty child for the
custom drawing.
Jonas Dreßler [Thu, 31 Oct 2019 23:44:02 +0000 (00:44 +0100)]
appDisplay: Rename _allItems array to _orderedItems
Since both the `_items` object and the `_allItems` array include the
same items, the difference between those variables seems unclear. The
real difference between them (except the different data type) is that
`_allItems` is ordered in the same order as the visible grid, so rename
`_allItems` to `_orderedItems` which makes that more obvious.
Jonas Dreßler [Wed, 4 Dec 2019 20:37:34 +0000 (21:37 +0100)]
checkBox: Fix expand and align properties
In f2bd39b20c89c1896c124f1dccdd587aa544e45c, the expand property for
checkboxes was accidentally set to the grandchild (the StBin), instead
of the child (the StBoxLayout) of the StButton. Fix that and let the
BoxLayout expand instead of the Bin.
Florian Müllner [Sat, 30 Nov 2019 18:15:14 +0000 (19:15 +0100)]
extensionPrefs: Always redefine getCurrentExtension() on prefsModule access
We have three interactions with an extension's prefs module:
- we import the module
- we call its init() hook
- we call its buildPrefsWidget() hook
The first two are one-time actions where we expect most getCurrentExtension()
calls (local imports, initTranslations() etc.).
However it's still possible that the extension will use the utility function
in buildPrefsWidget() as well, either directly or via other functions like
getSettings(): Make sure getCurrentExtension() returns the correct extension
in that case, not the last one whose preferences were initialized.
appDisplay: Show newly created folder when creating
The icon grid currently sorts icons by their names. When creating new
folders, the folder may end up being in a different page, and that's
confusing since we don't actually move to where the new folder is.
Jonas Dreßler [Wed, 4 Dec 2019 20:23:20 +0000 (21:23 +0100)]
closeDialog: Fix scale of dialog for x11 clients in Wayland sessions
We missed this case in b6e57a5ae8e3871161e2bdcc44e46af1cc56b2f7,
XWayland clients obviously don't use MetaWindowWayland and thus they
don't apply the double scaling that commit was meant to fix.
Florian Müllner [Wed, 4 Dec 2019 19:01:41 +0000 (20:01 +0100)]
keyboard: Create extended keys before updating hover state
We want extended keys to have the same size as their parent key,
but this is currently broken and the keys end up with their
parent key's preferred size (which is smaller than its allocated
size).
This is due to the way ClutterActor's width/height properties work,
which only return the "real" (i.e. allocated) size when the allocation
is valid, and fall back to the preferred size otherwise.
As changing an StWidget's hover state involves adding or removing
the `:hover` pseudo class, this is currently always the case.
Creating the extended keys first means the keyButton's allocation
is probably valid, so do that.
Florian Müllner [Wed, 4 Dec 2019 18:02:33 +0000 (19:02 +0100)]
keyboard: Fix widget leak
We currently create an extended-keys popup every time it is requested,
but only destroy it (or rather: the last one) when the keyboard itself
is destroyed.
Jonas Ådahl [Fri, 22 Nov 2019 17:36:17 +0000 (18:36 +0100)]
Use paint and pick context to get framebuffer
Mutter and Clutter was changed to pass around the current target
framebuffer via the paint context instead of via the deprecated Cogl
framebuffer stack.
The framebuffer stack has also been removed from Cogl so change to use
the one in the paint context instead.
Jonas Ådahl [Fri, 22 Nov 2019 17:35:55 +0000 (18:35 +0100)]
Adapt to painting and picking API change
While still leaving them unused, pass around ClutterPaintContext and
ClutterPickContext when painting and picking.
The reason for splitting this change up in two is to make it possible to
bisect easier in between the API change and the change to using the
framebuffer passed around with the temporary contexts.
This code didn't even pay attention to the
cur_stmt->kind.media_rule->media_list, and unconditonally considered
each statement in the ->ruleset to be of kind ruleset. That seems
broken.
(The theme doesn't use any @media queries, and they are unsupported
anyway.)
Florian Müllner [Fri, 29 Nov 2019 00:11:16 +0000 (01:11 +0100)]
switcherPopup: Fix scrollable check
When commit c6cea277e replaced Shell.GenericContainer, the check
whether the required width exceeds the avilable width was changed
from using the minimum widths of items to the natural width of the
scroll view.
That doesn't work correctly, as the *natural* width may well exceed
the actually used width: SwitcherList bases its width request on
children's minimum sizes to force labels to ellipsize.
Fix this by using the minimum width of the scroll view's child instead.
Florian Müllner [Thu, 28 Nov 2019 00:23:36 +0000 (01:23 +0100)]
calendar-server: Use correct timezone for all-day events
Since commit 28c535e34, we use the timezone associated with the ICalTime
instead of the default timezone when converting to time_t. However while
that is correct for most events, for ICalTimes that don't have a timezone
associated we still want to fall back to the default timezone instead of
UTC.
Prevent the app-well-app-running dot from getting unintentionally
hidden behind the overview-icon background by initializing the
running-dot after its sibling overview-icon.
Florian Müllner [Mon, 25 Nov 2019 21:54:44 +0000 (22:54 +0100)]
fileUtils: Delete deleteGFile hack
It is true that delete is a javascript keyword, but that doesn't
prevent it from being used as method name - there are event built-in
types like Map or Set with delete() methods!
So if that hack was ever needed, this hasn't been the case for years
now; just removed the hack now.
texture-cache: Remove also scaled keys from the cache
We're storing in the texture cache images and scaled images appending
the scaling factor to the key. When a file changes the cache key
corresponding to that file is removed, but not the keys for the scaled
ones so that images in the cache are never reloaded.
This patch removes all keys from the cache related to the file that
changes, including those with the scaling factor.
A new set (hash table) was added to keep track of scale used to be able
to remove all possible images in the cache.
When the KEY is removed from the cache, we can look now in the scale set
for and each scale we also remove the key "KEY1.000000", "KEY2.000000",
etc.
Assuming that the number of used scales is small (I would typically
expect one or two), the overhead should be negligible.
Benjamin Berg [Mon, 25 Nov 2019 14:15:01 +0000 (15:15 +0100)]
data: Enable clean session shutdown after gnome-shell failure
If the GNOME shell crashes, we run a service that may disable
extensions. This is important so that users will not be locked out of
their own session in case an extension is causing crashes.
As this is a very agressive action, we tried to only do this in the
first two minutes of the session. Unfortunately, the logic was broken
and would result in an unclean session shutdown.
Fix this by using the newly introduced gnome-shell-disable-extensions
file. This is created by the extension subsystem for a period of time to
indicate the extensions may be the cause of a gnome-shell failure.
See
https://gitlab.gnome.org/GNOME/gnome-session/issues/43
for a log of the bug happening and the gnome-session part to fix this.